Information processing apparatus, print data generating method, print control program, and computer-readable recording medium

ABSTRACT

When an Offset or rotation sort output is designated as an output style, whether document data of one copy is printed to one paper (physical sheet) and outputted or not is discriminated. When it is printed to one paper, it is intended to enable the print such that the Offset or rotation output is not performed. An information processing apparatus has: a finishing command setting unit which can set a finishing command to a printer so as to rotation-sort-output or Offset-output the document data; and a counter for counting the number of physical sheets to which the document data of one copy whose output is desired is allocated. The finishing command setting unit sets the finishing command in a manner such that when the document data of one copy is printed onto one physical sheet as a result of the counting by the counter, the rotation sort output or the Offset output is not performed, and when the document data of one copy is printed onto two or more physical sheets, the rotation sort output or the Offset output is performed.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to an information processing apparatus, a printdata generating method, a print control program, and a computer-readablerecording medium, in which a desired print result can be obtained in aprint style which is set by an information processing apparatus such asa personal computer or the like connected to a printer.

2. Related Background Art

Hitherto, in a printing process in a system comprising a printer havinga function for printing on a page unit basis and an informationprocessing apparatus such as a personal computer connected to theprinter, as a printing method of performing a page control, a pagelayout print (N-up printing) such that a plurality of logical pages (Npages) are reduced and arranged into one physical page (one side of onesheet of a print paper) has been known. Such a layout print is also aprinting method suitable when the user wants to save output pages or adraft print or the like is executed. For example, two logical pages(output pages from an application) are layout-printed (2-up printing)into one page of the paper, thereby enabling the number of output papersto be saved to about the half (in case of a simplex printing).

As another page layout print, a 4-up printing such that four logicalpages are layout-printed into one physical page has been known.Similarly, an 8-up printing, a 9-up printing, a 16-up printing, and thelike have been known. As a layout direction in one physical page, it hasalso been known that the direction from the right to the left, thedirection from the top to the bottom, and the like are possible. Torealize the layout print, a method whereby when a print mode of documentdata or the like is instructed on the information processing apparatusside, the operator designates a page layout print mode, designates thenumber of logical pages which are arranged into one physical page, andfurther, designates the layout direction has been known. It has alsobeen known that when the page layout mode is once designated, the modesetting is valid until the layout mode is designated again.

In a printer having a duplex printing function, it has also been knownthat when an executing mode of the duplex printing is designated on theinformation processing apparatus side and the designated mode istransmitted to the printer, the duplex printing function is executed onthe printer side without executing any special processes on theinformation processing apparatus side.

Further, in a printing process in a system comprising a printer having afunction for printing on a page unit basis and an information processingapparatus such as a personal computer or the like connected to theprinter, as a printing method of performing an output style (finishing)control, a method of performing a sorting process in case of a printerhaving sorter bins and changing the output bin on a copy unit basis,thereby making the sorting operation easy has been known. Also in aprinter having no sorter bin, an Offset output such that outputpositions are alternately slightly deviated and the papers are outputtedon a copy unit basis, a rotation output such that the direction of thepaper is rotated by 90° and the papers are outputted on a copy unitbasis, and the like have been known. The Offset output and the rotationoutput will now be described with reference to FIGS. 13A, 13B, and 14.

FIGS. 13A and 13B are diagrams for explaining the Offset output in thecase where three copies of a document in which one copy is constructedby three pages are outputted. FIG. 13A shows an example in the casewhere all pages are deviated in a lump and outputted on a copy unitbasis. An arrow in the diagram indicates the direction in which thepapers are ejected from the printer. The diagram illustrates a statewhere the second copy is deviated from the first copy in the direction(lateral direction) which crosses perpendicularly to the printerejecting direction and outputted. Further, the diagram shows a statewhere the third copy is outputted to the same position as that of thefirst copy so that it can be distinguished from the second copy. Asmentioned above, according to the Offset output, the copies areoutputted by alternately changing the output positions every differentcopy.

FIG. 13B shows a state where only the head page of each copy is deviatedin the lateral direction and the papers are outputted. As mentionedabove, it has been known that there are two kinds of methods in theOffset output.

FIG. 14 is a diagram for explaining the rotation output in the casewhere three copies of a document in which one copy is constructed bythree pages are outputted. An arrow in the diagram similarly indicates adirection in which the papers are ejected from the printer. The diagramshows a state where the second copy is rotated by 90° and the papers areoutputted. As mentioned above, according to the rotation output, theoutput papers are rotated by 90° every different copy and the papers areoutputted.

However, according to the above method, even if the number of outputpapers to which one copy of the print data which the user wants to printis printed is equal to one, so long as the Offset output or rotationoutput is instructed, each copy is Offset-output or rotation-output.Generally, if the number of print papers to which one copy of the printdata is equal to 1, it can be sorted without Offset-outputting orrotation-outputting. On the contrary, to the operator, if the Offsetoutput or rotation output is not performed, the print paper can berather easily picked up and arranged. There is, consequently, a problemsuch that in a document comprising a plurality of copies, when thenumber of papers to which one copy of the print data is equal to 1, ifthe Offset output or rotation output is performed, the print papersbecome bulky and it is difficult to arrange them.

In a case where the papers to which the print data of one copy isejected as one sheet of paper from the printer as mentioned above,although a method whereby the user preliminarily turns off the ON-stateof a check box of “Offset output” or “rotation sort” by using a printmode setting function of a printer driver is also considered, there is aproblem such that if the user is allowed to designate each time aprinting instruction is issued, a burden on the user increases.

To install an automatic discriminating process into the printer side,not only development costs or product costs rise but also a pre-paperfeed cannot be performed or the like. There is a risk of reduction inprinting throughput.

SUMMARY OF THE INVENTION

The invention is made in consideration of the above conventionaltechniques and it is an object of the invention to provide aninformation processing apparatus, a print data generating method, and aprint control program, in which when the Offset output or rotation sortoutput has been designated as an output style, whether document data ofone copy is printed onto one sheet of paper (physical sheet) andoutputted or not is discriminated, and in the case where the documentdata is printed to one sheet of paper, it is intended to generate printdata which can set a printing such that the Offset output and therotation output are not performed, and to also provide acomputer-readable recording medium which stores such a program.

To accomplish the above object, according to the invention, there isprovided an information processing apparatus comprising: finishingcommand setting means which can set a finishing command to a printer soas to rotation-sort-output or Offset-output document data; and countingmeans for counting the number of physical sheets to which the documentdata of one copy whose output is desired is allocated, wherein thefinishing command setting means sets the finishing command in a mannersuch that in the case where the document data of one copy is printedonto one physical sheet as a result of the counting operation by thecounting means, the rotation sort output or the Offset output is notperformed, and in the case where the document data of one copy isprinted onto two or more physical sheets, the rotation sort output orthe Offset output is performed.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a schematic construction of aninformation processing apparatus according to an embodiment of theinvention;

FIG. 2 is a diagram showing a memory map in the embodiment;

FIG. 3 is a diagram showing a construction of a memory medium in theembodiment;

FIG. 4 is a flowchart showing processes of the information processingapparatus according to the embodiment;

FIG. 5 is a diagram showing a UI picture plane for designatinginformation necessary for the processes in the embodiment;

FIG. 6 is a diagram showing data necessary for the processes in theembodiment;

FIG. 7 is a flowchart showing a generating process of intermediate datain the embodiment;

FIG. 8 is a diagram showing a structure of files necessary for aprinting process in the embodiment;

FIG. 9 is a diagram showing an output result in the embodiment;

FIG. 10 is a flowchart showing an editing/output process of theintermediate data in the embodiment;

FIG. 11 is a flowchart showing a command setting process in theembodiment;

FIG. 12 is a flowchart showing a command setting process according to amodification;

FIGS. 13A and 13B are diagrams showing examples of the Offset output ofthe conventional technique; and

FIG. 14 is a diagram showing an example of the rotation output of theconventional technique.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments according to the invention will be described indetail hereinbelow with reference to the drawings.

First Embodiment

FIG. 1 is a block diagram showing a construction of an informationprocessing apparatus according to the first embodiment. In the diagram,reference numeral 1 denotes an information processing apparatus such asa personal computer (PC) or the like comprising, as main componentelements: a video memory (hereinafter, VRAM) 3; a monitor 4; a keyboard(hereinafter, KBD) 5; a pointing device (hereinafter, PD) 6; a diskcontroller 7; a hard disk (hereinafter, HD) 9; a connector unit 10; aCPU 11; an RAM 12; and an ROM 13. Those component elements are mutuallyconnected via a system bus 2. Details of the component elements will bedescribed hereinlater.

The CPU 11 controls the whole information processing apparatus 1 inaccordance with a program shown in FIG. 2 and the like, which will beexplained hereinlater. The RAM 12 stores a program as a main memory ofthe CPU 11 and also has a temporary memory area for various data whichis used as a work data area upon execution of the control by the CPU 11.

The disk controller 7 performs a control of an access to an externalmemory such as HD 9, FD 8, or the like.

The HD 9 and FD 8 are devices for recording data into a magnetic memorymedium on a disk and reading and writing it to/from the medium. The HD 9and FD 8 store: various document data such as text data, graphic data,and the like; further, a boot program of the information processingapparatus 1 which is downloaded into the RAM 12 and executed; anoperating system (OS) as a control program of the CPU 11; variousapplication programs; a printer control command (print data) generatingprogram (printer driver); a present print system program having asynthesizing function and the like of the print data; and the like. Thememory medium is not limited to the hard disk and the floppy disk butcan be a magnetic tape, a CD-ROM, an IC memory card, a DVD, and thelike.

The ROM 13 is an internal memory in which various data and programs havebeen stored in a manner similar to the HD 9, FD 8, and the like asmentioned above.

The monitor 4 displays a user interface (UI) such as various figuressuch as bit map data and the like, a command image or the like ofcommand menu, messages from the operator, and the like in theinformation processing apparatus 1 onto a screen. The monitor 4comprises a CRT (Cathode Ray Tube), a liquid crystal, an FLC, or thelike.

The VRAM 3 stores data to be displayed on the monitor 4.

The KBD 5 and PD 6 are operated by the operator and used for inputtingvarious data, commands, print mode, or the like by the operator. Thecommand image or the like of the command menu displayed on the screen ofthe monitor 4 is selected by the KBD 5 or PD 6, so that the execution ofthe command or the print mode can be instructed.

The connector unit 10 is connected to a connector unit 17 of a printer15 via a predetermined bidirectional interface 14 such as Centronicsinterface, network interface, or the like and executes a communicationcontrol process with the printer 15, which will be explainedhereinlater, for example, executes transmission of a printer controlcommand (print data) or the like.

The printer 15 comprises, as main component elements: a connector unit17; a printer engine 18; an operation unit 19; an external memory 20; aCPU 21; an RAM 22; and an ROM 23. Those component elements are mutuallyconnected via a system bus 16. Details of the component elements will bedescribed hereinlater.

The CPU 21 is a printer CPU for controlling the whole printer 15. TheCPU 21 transmits an image signal to the printer engine 18 by the printercontrol command (print data) received by the connector unit 17 on thebasis of a control program stored in the ROM 13 or external memory 20,which will be explained hereinlater.

As a main memory of the CPU 21, the RAM 22 has a temporary memory areafor various data which is used as a work data area upon execution of thecontrol by the CPU 21.

The external memory 20 can be also connected as an option to the printerand stores font data, an emulation program, form data, and the like.

The ROM 23 is a printer internal memory in which various data, theprinter control program for controlling the printer, and the like havebeen stored in a manner similar to the external memory.

The printer engine 18 is controlled by the CPU 21, receives the imagesignal generated through the system bus by the control program stored inthe ROM 23 or external memory 20, and executes the actual printing.

The operation unit 19 comprises: an input unit such as operation panel,operation switches, and the like; a display unit such as LED, liquidcrystal panel, etc.; and the like. The operation unit 19 receives theoperation of the operator and displays a result of the operation. Theoperator can designate and confirm the setting of the printer 15 throughthe operation unit 19.

The connector unit 17 is connected to the connector unit 10 of theinformation processing apparatus 1 via the bidirectional interface 14and can receive the printer control command and notify a state in theprinter or the like.

Further, although not shown, the printer 15 has: a paper feed unit forfeeding the papers; paper ejecting bins on which the papers ejected fromthe printer 15 are stacked; a paper ejecting tray; and the like. Thepaper ejecting bins and paper ejecting tray can be used for the Offsetoutput and the rotation output.

Subsequently, processing steps which are executed until a printprocessing apparatus having a synthesizing function of the print dataand the like in the information processing apparatus 1 of the embodimentoperates will be further described with reference to FIGS. 1 to 3mentioned above.

The CPU executes a basic I/O program (BIOS), an operating system (OS),and a print processing program, so that the print processing apparatusoperates.

The BIOS has been written in the ROM 13. The operating system (OS) hasbeen written in the external memory such as HD 9, FD 8, or the like.

First, when a power source of the information processing apparatus 1 isturned on, the operating system (OS) stored in the external memory suchas HD 9, FD 8, or the like is read out and loaded into the RAM 12 by aninitial program loading (IPL) function in the BIOS and the OS is madeoperative.

Subsequently, the operator selects the command image or the like on thecommand menu displayed on the screen of the monitor 4 by the KBD 5 andPD 6 and instructs the execution of an application. Thus, theapplication stored in the external memory such as HD 9, FD 8, or thelike is read out and loaded into the RAM 12 and the application is madeoperative.

Subsequently, by a procedure similar to that upon activation of theapplication, when the printing is instructed by the operator, the printprocessing module having the synthesizing function of the print data andthe like and the printer control command generating program (printerdriver) which have been stored in the external memory such as HD 9, FD8, or the like are read out and loaded into the RAM 12 and the printprocessing system is made operative.

In case of the embodiment, the print processing module and the relateddata have been stored in the FD 8. FIG. 3 shows a construction of therecorded contents. The contents include volume information, directoryinformation, a print processing execution file, a print processingrelated data file, and the like.

The print processing module and the related data stored in the FD 8 canbe also loaded into the information processing apparatus via the diskcontroller 7. When the FD 8 is set into the disk controller 7, the printprocessing module and the related data are read out from the FD 8 underthe control of the OS and the BIOS and loaded into the RAM 12, so thatthey can be operated.

FIG. 2 shows a memory map in a state where the print processing programhas been loaded into the RAM 12 and can be executed. The BIOS, OS, printprocessing program, application program, related data, and work area arestored and formed in the RAM 12.

Subsequently, an operating method of the print processing system havingan auto page layout function or the like of the print data in theinformation processing apparatus 1 of the embodiment will be describedwith reference to flowcharts, a user interface (UI) picture planediagram, data format diagram, and table and output examples in FIGS. 4to 12.

The processes are started in a state where the program such as aprintable application or the like is operating by the foregoingprocessing steps.

According to the embodiment, when a printing process of the documentdata is designated by the application, the N-up printing is designated,the Offset output is further selected as an output style, and an Automode is designated, an intermediate data writing program converts thedocument data received from the application into intermediate data, theintermediate data is temporarily stored as an intermediate data file,the total number (I) of logical pages is calculated, and further, a pageinformation file in which page information including the calculatedtotal number of pages is generated. After that, in an intermediate dataediting program, the page information file is read, the number ofphysical sheets of the document data of one copy is calculated, and ifthe number of physical sheets is equal to 1, a command to turn off anOffset mode is set. After that, an intermediate data output programoutputs the intermediate data to the printer control command generatingprogram (printer driver) or a program existing in the step at the frontstage thereof. Finally, the printer control command generating program(printer driver) generates the printer control command and executes theprinting.

FIG. 4 is a flowchart showing a flow of the print processing system inthe embodiment. First, in step S401 in FIG. 4, a print style, the numberof pages, a layout order, the number of print copies, and the Offsetmode as finishing command setting means for setting an output style aredesignated by the mode setting UI serving as print mode setting meansfor making the print processing system function.

In step S402, subsequently, the printing is designated. The designationof the print mode and the printing can be also instructed by a methodwhereby the system is operated by the KBD 5 and PD 6 in FIG. 1 mentionedabove and the command image or the like on the command menu displayed onthe screen of the monitor 4 is selected.

Subsequently, step S403 follows and the intermediate data is generated.When the intermediate data is generated in step S403, step S404 followsand the intermediate data is edited.

Step S405 follows and the intermediate data is sent to the printerdriver. In step S406, the printer control command (print data) isgenerated and sent to the printer. This process is a normal printingstep which is executed by the printer control command generating program(printer driver). The printing process is finished.

Subsequently, the designating method of the print mode in step S401 willbe described in detail with reference to FIG. 5.

FIG. 5 shows a print mode designating UI in case of designating theprint mode in step S401 in FIG. 4 in the embodiment. In the diagram, (a)denotes a switch for designating the N-up printing as a print style. Theswitch (a) has a normal print button for designating the normal printingand an N-up print button for designating the N-up printing. Thoseswitches are alternative switches and only one of them can be selected.FIG. 5 shows a state where the N-up printing has been selected and acheck box of the N-up printing button is reversed in black.

(b) denotes a combo box for designating the number of pages in the N-upprinting. When a downward arrow button on the right side in a box isclicked, the number of pages which can be designated in the N-upprinting, for example, “2”, “4”, “8”, “9”, “16”, or the like can besequentially selected. FIG. 5 shows a state where “4” pages are selectedas the number of pages has been selected. That is, by this setting, alayout such that four logical pages are arranged in one page of thephysical sheet is selected.

(c) denotes a combo box for designating a layout order in the N-upprinting. When a downward arrow button on the right side in a box isclicked, the layout order according to the number of logical pagesmentioned above can be designated in the N-up printing. That is, one of“top, left→right”, “top, right→left”, “top, left→down”, “top,right→down”, and the like can be selected. FIG. 5 shows a state where“top, left→right” has been selected as a layout order.

(d) denotes a combo box for designating the number of copies. FIG. 5shows a state where “3 copies” has been selected.

(e) denotes a combo box for designating the Offset mode as an outputstyle. When a downward arrow button on the right side in a box isclicked, one of ON, OFF, and Auto can be sequentially selected. ONdenotes a mode in which the Offset output is always performed. OFFdenotes a mode in which the Offset output is not performed. Auto denotesa mode in which the Offset printing is not automatically performed inthe case where the print data of one copy in the embodiment is outputtedonto one sheet of print paper.

In the diagram, (f) denotes an OK button switch which is selected whenthe designated mode is determined. (g) denotes a cancel button which isselected when the designated mode and the designation of the print modeare cancelled.

When the mode is determined by selecting the OK button (f), theinformation indicative of the print mode and the like is temporarilystored into the work area and can be referred to in a subsequentprocessing step.

If the printer main body supports a duplex printing function, a duplexprinting can be also instructed on the setting picture plane shown inFIG. 5.

A method for a plural-copy printing will be subsequently described withreference to FIG. 4. The number of copies designated in (d) in FIG. 5 isreferred to in the sending of the intermediate data in step S405 in FIG.4. When a plurality of-copies are sent, it is realized by repeating anintermediate data sending process in step S405 the number of timescorresponding to the number of copies designated in (d) in FIG. 5.

The method of generating the intermediate data in step S403 will now bedescribed with reference to FIGS. 6 and 7.

FIG. 6 shows a draw command of the document data which is transmitted tothe information processing apparatus when the print execution isdesignated from the application or the like in step S402 in FIG. 4 ofthe embodiment.

As shown in FIG. 6, the draw command starts from a “job start command”and ends at a “job end command”. A printer initialization commandappears next to the “job start command” and comprises a “finishingcommand”, a “No. of copies command”, a “paper size command”, a “printdirection command”, and the like. The “finishing command” includes anOffset designation command serving as an output style and the like.

The draw command has a “print chr (print character) command”, a “colorcommand”, a “draw fig (draw figure) command”, a “draw image command”, a“form feed command”, and the like. The “color command” is a command forpreviously designating the colors in case of the “print chr command” andthe “draw fig command”. The color of a character or a figure which isprinted subsequently is designated by an RGB format. As a general imagedata format, a color data table of the RGB format is included in a dataportion in the “draw image command”. The color of each pixel in case ofdrawing an image is designated by a method whereby each pixel valueindicates an index of the color table. As other information, bit mapdata, information showing a width, a height, and coordinates of adrawing position, and the like are also included in the “draw imagecommand”.

Further, information showing a character type, a character code,coordinates of a character printing position, a character width, acharacter height, a character feed width, a line feed height, and thelike is included in the “print chr command”. A kind of drawing figure,an attribute of each of the drawing figures, information of the drawingposition coordinates, and the like are also included in the “draw figcommand”.

FIG. 7 is a flowchart showing the intermediate data generating step instep S403 in FIG. 4, that is, the step of generating the intermediatedata from the draw command in FIG. 6.

First, in step S701 in FIG. 7, a count value of a page counter (i) isinitialized to 0.

Subsequently, in step S702, each draw command shown in FIG. 6 issequentially received one by one from the first command and assumed tobe M.

In step S703, whether the draw command M received in step S702 is the“job start command” or not is discriminated. If it is determined in stepS703 that the received draw command M is the “job start command”, stepS704 follows and the page information file for recording the pageinformation is opened.

In next step S705, the intermediate data file to temporarily store theintermediate data of the first page is opened.

In step S706, the count value of the page counter (i) is set to (i+1).

In step S707, a page number (i) and a file name Pi of the intermediatedata temporary storage file opened in step S704 are recorded as pageinformation.

In step S708, the received draw command M is converted into theintermediate data and recorded into the opened intermediate datatemporary storage file.

The processing routine is subsequently returned to step S702 and thenext draw command is received and newly assumed to be M.

If it is determined in step S703 that the received draw command M is notthe “job start command”, step S709 follows and whether the received drawcommand M is the “form feed command” or not is discriminated.

If it is determined in step S709 that the received draw command M is the“form feed command”, step S710 follows and the draw command M isconverted into the intermediate data and recorded in a manner similar tostep S708.

Subsequently, step S711 follows and the opened intermediate datatemporary storage file of the i-th page which has been recorded atpresent is closed.

In step S712, the count value of the page counter (i) is set to (i+1).

In step S713, an intermediate data file to temporarily store theintermediate data of the i-th page is newly opened.

In step S714, the page number (i) and the file name Pi of theintermediate data temporary storage file opened in step S713 arerecorded as page information.

The processing routine is subsequently returned to step S702 and thenext draw command is received and newly assumed to be M.

If it is determined in step S709 that the received draw command M is notthe “form feed command”, step S715 follows and whether the received drawcommand M is the “job end command” or not is discriminated.

If it is determined in step S715 that the received draw command M is notthe “job end command”, step S716 follows and the draw command M isconverted into the intermediate data and recorded. The processingroutine is returned to step S702 and the next draw command is receivedand newly assumed to be M.

If it is determined in step S715 that the received draw command M is the“job end command”, step S717 follows and the draw command M is convertedinto the intermediate data and recorded.

Subsequently, step S718 follows and the intermediate data temporarystorage file for temporarily storing the intermediate data which isreferred to at present is closed.

In step S719, a page information temporary storage file in which thepage information has been recorded is closed. The processing routine isfinished.

Subsequently, the recording method of the page information in steps S707and S714 in FIG. 7 and the method of converting it into the intermediatedata and the recording method thereof in steps S708, S710, S716, andS717 will be described with reference to FIG. 8.

FIG. 8 is a table showing a structure of the intermediate data temporarystorage file of the embodiment. This table is stored into a storagedevice such as an HD 9 or the like in FIG. 1.

In FIG. 8, the temporary storage file comprises the page informationtemporary storage file for recording the page information and thetemporary storage file for recording the intermediate data every page.

The page information temporary storage file is a file which is recordedwhen the page information recording step in steps S707 and S714 in FIG.7, that is, the head page and form feed processes are executed. Thepresent page number (i) and the file name Pi of the intermediate datatemporary storage file corresponding to this page are recorded. Forexample, in FIG. 8, a file name P1 is a file for recording theintermediate data of the first page. The count value of the page numbercounter (i) is updated every page information recording step. Finally,as the total number of pages, “I” is recorded as (i).

The intermediate data temporary storage file is an area for recordingthe intermediate data obtained by replacing the draw command by anothercommand format and formed every page divided by the “form feed command”or the like in the draw command in FIG. 6 mentioned above.

The intermediate data can be also formed in a format obtained bycollecting a plurality of draw commands into one command, or the like.

The intermediate data editing step in step S404 in FIG. 4 will now bedescribed with reference to a diagram of FIG. 9 and flowcharts of FIGS.10 and 11.

FIG. 9 is the diagram for explaining a page layout printing function inthe intermediate data editing step in the embodiment. In the diagram, L1to L17 denote logical pages Li. In the example, i=1 to 17 and an exampleof output pages of 17 pages is shown. In the diagram, F1 and F2 denotepages which are actually outputted to the printer, that is, physicalpages Fi. A layout such that the data of each of the logical pages Li isreduced and allocated into one page of the physical sheet (output paper)is obtained.

N denotes the number of N-up pages, that is, the number of logical pageswhich are arranged into one page of the physical sheet. In this example,N=9 (9-up) and nine logical pages are reduced and arranged into one pageof the physical sheet. In FIG. 9, the layout order is set to “top,left→right”, the top left position is set to the first page L1 of thelogical pages, subsequently, the logical pages L2 and L3 aresequentially arranged to the right. After that, the logical pages L4 andL5 are sequentially arranged to the right at the lower stage. Asmentioned above, however, the layout order in the N-up printing functionis not limited to the above order. A layout order of “top,right→down→left column” or a layout of “top, left→down→right column” canbe also used. As mentioned above, the number (N) of logical pages whichare arranged into one page of the physical sheet is not limited only to9 pages (9-up) but can be also set to 2 pages (2-up), 4 pages (4-up), 8pages (8-up), 16 pages (16-up), or the like. At this time, the number(I′) of pages of the physical sheets Fi is expressed by the quotient of(I/N). Further, assuming that the number of logical pages is equal to 1page (1-up), a normal direct (equal magnification) copy output such thatone logical page is arranged to one page of the physical sheet isperformed in a manner similar to the case where the page layout is notperformed.

The page number of the intermediate data, the logical pages Li, and thephysical pages Fi mentioned above will be further described in detailwith reference to FIG. 8.

An intermediate data file in FIG. 8 is generated in order of the drawcommands from the application in FIG. 6. The page numbers of theintermediate data file coincide with those outputted by the application.

The logical pages Li are pages in which the page numbers of theintermediate data have been rearranged for the N-up printing functionand unconditionally correspond to those of the intermediate data file.For example, with respect to the page numbers 1 to I of the intermediatedata file, assuming that the logical pages Li are reversely allocated toLI to L1 and the layout of the physical pages Fi is set to N=1 (1-up),the data is printed in a simple reverse order. As a method of allocatingthe logical pages and the physical pages, various combinations arepossible. The layout style of the output pages can be also changed tovarious layouts.

A page edition processing flow of the intermediate data editing processin step S404 in FIG. 4 will now be described with reference to FIG. 10.

FIG. 10 is the flowchart showing the intermediate data editing step inthe embodiment. First, in step S1001, the page information file whichhas temporarily been stored is opened.

Subsequently, step S1002 follows and the page information is read outfrom the page information file. As shown in the explanation of FIG. 8,the total number (I) of pages, the file name Pi of the intermediate datarecording file of each page, and the like are included in the pageinformation.

In next step S1003, on the basis of the print mode in step S401 in FIG.4 mentioned above, the number (N) of pages for the N-up printing as anoptimum page layout printing is newly calculated.

In step S1004, as a layout set-up, as mentioned above, the logical pagesLi are allocated to the page numbers of the intermediate data and ascaling ratio (reduction magnification) S of each of the logical pagesLi at the time when they are arranged into the physical page iscalculated. Such an allocation is set by the operator at the time of thedesignation of the print mode in step S401 in FIG. 4 and the scalingratio S is calculated on the basis of the set allocation. Specificallyspeaking, like an example described in FIG. 8 mentioned above, a processsuch that when the reverse order is designated, the logical pages Li areallocated in order opposite to that of the page numbers of theintermediate data file, or the like is executed.

In accordance with the number (N) of N-up pages calculated in stepS1003, for example, the scaling ratio S can be simply set to S=1/3 or amagnification that is slightly smaller than 1/3 if N=9 like an exampledescribed in FIG. 8 mentioned above.

In step S1005, the count value of the page counter (i) for counting thenumber of logical pages Li is initialized to “1”. A count value of acounter (f) for counting the number of physical pages is alsoinitialized to “1”.

In step S1006, whether the count value of the page counter (i) is equalto (i=I+1) with respect to the total number (I) of logical pages or notis discriminated. The total number (I) of logical pages coincides withthe number of pages of the intermediate data file.

If i=I+1 in step S1006, step S1019 follows and the command to designatethe output style is set again in accordance with a situation.

Subsequently, it is assumed that the edition of all of the intermediatedata files has been finished, and the processing routine advances tostep S1020. As an end of the job, the job end code is outputted at thelast of the intermediate data file corresponding to the logical page LI.

In next step S1021, the page information file is closed and theprocessing routine is finished.

If i≠I+1 in step S1006, step S1007 follows and a position (referenceposition) for arranging the logical pages Li to the physical page iscalculated. The reference position denotes coordinates showing aposition in the physical page where, for example, the coordinates of thetop left logical page are arranged, or the like. The reference positionis determined on the basis of the number N of logical pages Li to bearranged to one physical page which was calculated in step S1003, thelayout order, and the target logical page among the logical pages Li. Inthe example of the explanation of the physical page in FIG. 9, assumingthat the present target logical page is L2, since N=9 (9-up) and thelayout order is “top, left→right”, if the top left position of thephysical page is regarded as a coordinate origin, it is also possible tosimply set the coordinates in a manner such that (a coordinate×in thelateral direction)=(a width of physical page 3) and (a coordinate y inthe vertical direction)=(a height of an upper blank).

In next step S1008, the intermediate data file corresponding to thelogical pages Li is opened.

In step S1009, records of the intermediate data are sequentially readand assumed to be “R”.

In step S1010, whether the intermediate data R read in step S1009indicates the “form feed” or “job end” is discriminated.

If it is determined in step S1010 that the intermediate data R does notindicate the “form feed” or “job end”, step S1011 follows and areplacing process of the read intermediate data R is executed.

If it is not particularly necessary to replace, the intermediate data isnot replaced and the processing routine can also directly advance to thenext step.

In step S1012, the intermediate data R replaced in step S1011 is assumedto be R′ and outputted to the intermediate data file and edited inaccordance with the scaling ratio S and the position which werecalculated in step S1004.

Subsequently, the processing routine is returned to step S1009 and arecord of the next intermediate data is obtained and newly set to R.

If it is determined in step S1010 that the intermediate data R indicatesthe “form feed” or “job end”, step S1013 follows and whether Mod(i, N)=0or not is discriminated to decide whether the form feed operation of thephysical page is executed or not. Mod(i, N) is a function forcalculating a remainder obtained by dividing the present count value ofthe logical page counter (i) by the number (N) of logical pages to bearranged to one physical page.

If Mod(i, N)≠0 in step S1013, step S1014 follows and the intermediatedata file corresponding to the logical page Li which is at present openis closed.

Subsequently, in step S1015, the logical page counter (i) is set to(i=i+1) and advanced by a value corresponding to one page.

The processing routine is returned to step S1006 mentioned above.

If Mod(i, N)=0 in step S1013, step S1016 follows and the form feed ofthe physical page is performed. That is, a form feed page record isrecorded as intermediate data to the last of the intermediate data filecorresponding to the logical page Li which is at present open. Further,the count value of the physical page counter (f) is increased to(f=f+1).

In step S1017, the intermediate data file corresponding to the logicalpage Li which is at present open is closed.

Subsequently, in step S1018, the logical page counter (i) is set to(i=i+1) and advanced by a value corresponding to one page.

The processing routine is returned to step S1006 mentioned above andwhether the processing routine is finished or not is discriminated.

The command setting method in step S1019 in FIG. 10 will now bedescribed with reference to FIG. 11.

FIG. 11 is the flowchart showing a step of automatically setting anOffset command in the embodiment.

First, in step S1101, whether the Offset mode designated in step S401 inFIG. 4 is Auto or not is discriminated.

If the Offset mode is not Auto in step S1101, the Offset command isfinished without changing the number of pages designated in step S401 inFIG. 4.

If the Offset mode is Auto in step S1101, step S1102 follows and whetherthe count value of the physical page counter (f) is equal to 1 or not isdiscriminated.

If f=1 in step S1102, step S1103 follows and the Offset command is resetto OFF and the processing routine is finished.

If f≠1 in step S1102, step S1104 follows and the Offset command is resetto ON and the processing routine is finished.

Thus, whether the document data of one copy is outputted to one sheet ofpaper when a plurality of logical pages are N-up printed or not isdiscriminated. If YES, the Offset command is automatically set to OFF.Therefore, the problem such that it becomes difficult to pick up or sortthe printed sheets can be solved.

Second Embodiment

The second embodiment according to the invention will now be described.

According to the embodiment, when the printing process of the documentdata is designated by the application, the N-up printing is designated,further, the rotation output is selected as an output style, and theAuto mode is designated, the intermediate data writing program convertsthe document data received from the application into the intermediatedata, temporarily stores the intermediate data as an intermediate datafile, calculates the total number (I) of logical pages, and further,generates a page information file in which the page informationincluding the total number of logical pages has been recorded. Afterthat, in the intermediate data editing program, the page informationfile is read, the number of physical sheets of the print data of onecopy is calculated, and if the number of physical sheets is equal to 1,the command is set again so as to cancel the rotation output mode.

After that, the intermediate data output program outputs theintermediate data to the printer control command generating program(printer driver) or the program existing in the step at the front stagethereof. The printer control command generating program (printer driver)finally generates the printer control command (print data) and prints.

The second embodiment can be similarly realized by changing thedesignation of the Offset mode in the explanatory diagram of UI in FIG.5 to the designation of the rotation output mode and, further, replacingthe Offset command to the rotation command in each step in FIG. 11.

Also in the above construction, an effect similar to that of theforegoing first embodiment can be obtained.

A modification of the embodiments will be further described withreference to FIG. 12.

As described with reference to FIG. 11, in the first embodiment, if theOffset mode is Auto, a control is made so as to set the Offset commandin accordance with the value of the physical page counter. Themodification, however, has a construction such that if the Auto modeshown in FIG. 5 is not provided, that is, when only ON or OFF exists asa setting mode of the Offset mode, it is intended to obtain an effectsimilar to that in the first embodiment.

First, if the Offset mode is not ON in step S1201, the Offset command isfinished without changing the number of pages designated in step S401 inFIG. 4.

If the Offset mode is ON in step S1201, step S1202 follows and whetherthe count value of the physical page counter (f) is equal to 1 or not isdiscriminated.

If f≠1 in step S1202, the Offset command is held to be ON withoutchanging. The processing routine is finished.

If f=1 in step S1202, step S1203 follows and the Offset command is setto OFF again and the processing routine is finished.

Thus, when a plurality of logical pages is N-up printed, even if theOffset mode has been set to ON, whether the document data of one copy isoutputted to one sheet of paper or not is discriminated. When it isoutputted to one paper, the Offset command which has been set to ON isautomatically switched to OFF, so that the problem such that it becomesdifficult to pick up or sort the printed sheets can be solved.

Naturally, the control of the modification can be applied to therotation output mode described in the second embodiment.

The invention can be also applied to a system constructed by a pluralityof apparatuses or can be also applied to an apparatus comprising oneequipment.

Naturally, the invention can be also applied to a case where it isaccomplished by supplying a program for controlling the printing to asystem or an apparatus.

In this case, a computer-readable recording medium in which the programaccording to the invention has been stored constructs the invention. Byreading the program from the recording medium and loading it into asystem or an apparatus, the system or apparatus operates in accordancewith a predetermined method.

Although the embodiments have been shown and described with respect tothe example in which the present print processing program and relateddata are directly loaded into the RAM 12 and executed, it is alsopossible to use another construction such that the print processingprogram and related data are read out from the FD 8 and once stored(installed) into the HD and, when the print processing program is madeoperative, they are loaded into the RAM 12 from the HD.

The medium for recording the present print processing program is notlimited to the floppy disk but can also use a magnetic tape, a CD-ROM,an IC memory card, a DVD, or the like.

It is also possible to use a construction such that the present printprocessing program is stored into the ROM 13 and it constructs a part ofa memory map and can be directly executed by the CPU 11.

The embodiment can be applied also to an information processingapparatus for transmitting the print data to the printer having theduplex printing function. If the printer has the duplex printingfunction and a duplex printing mode is designated, the informationprocessing apparatus discriminates whether the document data (printdata) of one copy is arranged to one page of the physical sheet or not.

For example, assuming that the number of logical pages of the print dataof one copy is equal to 4 pages and the 2-up is designated as an N-upprinting, if the duplex printing is executed, every two logical pagesare arranged to one side of the physical sheet. Therefore, the printdata of one copy is arranged to one physical sheet. In the case wherethe print data of one copy is arranged to one physical sheet, byperforming a control such that the Offset output and the rotation outputare not performed, an effect similar to that of the invention can beobtained.

As described above, when the Offset or rotation output has beendesignated as an output style, whether the number of copy papers towhich the document data of one copy is printed is equal to 1 or not isdiscriminated. If YES, the process is automatically executed lest theOffset or rotation output is performed. Therefore, in case of printingthe document data by a plurality of copies, a problem such that if it isOffset- and rotation-outputted every paper, the papers become bulky andit is difficult to sort them can be solved. Further, even if the pagelayout such as N-up or the like has been set, since the number of outputpapers can be counted, processes similar to those mentioned above can beexecuted. The above problem can be solved.

The above embodiments have merely been shown as examples of embodyingthe invention and the technical scope of the present invention must notbe limitatively interpreted. That is, many modifications and variationsare possible without departing from the technical idea and main featuresof the appended claims of the invention.

According to the invention as described above, for example, when theOffset print mode or rotation print mode has been set as a print mode,whether the number of papers to which the print data of one copy isprinted is equal to 1 or not is discriminated. If YES, the print datasuch that the Offset printing and rotation printing are not executed canbe generated.

1. Information processing apparatus provided with a printer driver,comprising: finishing command setting means which can set, on a printsetting screen of the printer driver, a finishing command, selected fromamong an enable mode, a disable mode and an automatic mode, to a printerso as to rotation-sort-output or Offset-output document data; layoutsetting means for setting, on the print setting screen of the printerdriver, a print layout of the document data; counting means for countingthe number of physical sheets to which the document data of one copywhose output is desired is allocated; print instructing means forinstructing execution of printing; spooling means for spooling thedocument data as intermediate data of a data format different from thatof the document data; intermediate data page editing means for making alayout print control of the intermediate data spooled by said spoolingmeans based on the number counted by said counting means and based onthe print layout set by said layout setting means; intermediate dataoutput means for outputting the intermediate data whose layout printcontrol is made by said intermediate data page editing means;discriminating means for discriminating, based on the counting by saidcounting means, whether the document data of one copy is printed ontoone physical sheet or onto two or more physical sheets, when theautomatic mode is set by said finishing command setting means; commandchanging means for changing the finishing command in response to adiscrimination made by said discriminating means; and print datagenerating means for adding the finishing command changed by saidcommand changing means to the intermediate data output by saidintermediate data output means so as to generate print data.
 2. Anapparatus according to claim 1, wherein said counting means executes thecounting on the basis of said intermediate data spooled by said spoolingmeans.
 3. An apparatus according to claim 2, further comprising:intermediate data page editing means for making a layout print controlof said intermediate data on the basis of the number counted by saidcounting means and the print layout set by said layout setting means;intermediate data output means for outputting said edited intermediatedata; and print data generating means for generating print data fromsaid outputted intermediate data.
 4. A print data generating methodcomprising: a finishing command setting step which can set, on a printsetting screen of the printer driver, a finishing command, selected fromamong an enable mode, a disable mode and an automatic mode, to a printerso as to rotation-sort-output or Offset-output document data; a layoutsetting step of setting, on the print setting screen of the printerdriver, a print layout of the document data; a counting step of countingthe number of physical sheets to which the document data of one copywhose output is desired is allocated, a print instructing step ofinstructing execution of printing; and a spooling step of spooling thedocument data as intermediate data of a data format different from thatof the document data, intermediate data output means for outputting theintermediate data whose layout print control is made by saidintermediate data page editing means; discriminating means fordiscriminating, based on the counting by said counting means, whetherthe document data of one copy is printed onto one physical sheet or ontotwo or more physical sheets, when the automatic mode is set by saidfinishing command setting means; command changing means for changing thefinishing command in response to a discrimination made by saiddiscriminating means; and print data generating means for adding thefinishing command changed by said command changing means to theintermediate data output by said intermediate data output means so as togenerate print data.
 5. A method according to claim 4, and wherein thenumber of physical sheets is counted in said counting step on the basisof the intermediate data spooled by said spooling step.
 6. Acomputer-readable recording medium which records a program, wherein saidprogram comprises: a finishing command setting step which can set, on aprint setting screen of the printer driver, a finishing command,selected from among an enable mode, a disable mode and an automaticmode, to a printer so as to rotation-sort-output or Offset-outputdocument data; a layout setting step of setting, on the print settingscreen of the printer driver, a print layout of the document data; acounting step of counting the number of physical sheets to which thedocument data of one copy whose output is desired is allocated, a printinstructing step of instructing execution of printing; a spooling stepof spooling the document data as intermediate data of a data formatdifferent from that of the document data; intermediate data output meansfor outputting the intermediate data whose layout print control is madeby said intermediate data page editing means; discriminating means fordiscriminating, based on the counting by said counting means, whetherthe document data of one copy is printed onto one physical sheet or ontotwo or more physical sheets, when the automatic mode is set by saidfinishing command setting means; command changing means for changing thefinishing command in response to a discrimination made by saiddiscriminating means; and print data generating means for adding thefinishing command changed by said command changing means to theintermediate data output by said intermediate data output means so as togenerate print data.
 7. An information processing apparatus providedwith a printer driver, comprising: finishing command setting means whichcan set, on a print setting screen of the printer driver, a finishingcommand selected from among an enable mode and a disable mode to aprinter so as to rotation-sort-output or Offset-output document data:layout setting means for setting, on the print setting screen of theprinter driver, a print layout of the document data; a user interfacemenu screen, provided by the printer driver, on which a user activatessaid finishing command setting means to set the finishing command andsaid layout setting means to set the print layout; counting means forcounting the number of physical sheets to which the document data of onecopy whose output is desired is allocated; spooling means for spoolingthe document data as intermediate data of a data format different fromthat of said document data; intermediate data page editing means formaking a layout print control of the intermediate data spooled by saidspooling means based on the number counted by said counting means andbased on the print layout set by said layout setting means; intermediatedata output means for outputting the intermediate data whose layoutprint control is made by said intermediate data page editing means;discriminating means for discriminating, based on the counting by saidcounting means, whether the document data of one copy is printed ontoone physical sheet or onto two or more physical sheets, when the enablemode is set by said finishing command setting means; command changingmeans for changing the finishing command in response to a discriminationmade by said discriminating means; and print data generating means foradding the finishing command changed by said command changing means tothe intermediate data output by said intermediate data output means soas to generate print data.
 8. An apparatus according to claim 7, furthercomprising: print instructing means for instructing execution ofprinting, wherein said counting means executes the counting on the basisof said intermediate data spooled by said spooling means.
 9. A printdata generating method of an information processing apparatus providedwith a print driver and comprising: a finishing command setting, on aprint setting screen of the printer driver, a finishing command settingstep selected from among an enable mode and a disable mode to a printerso as to rotation-sort-output or Offset-output document data; a layoutsetting step of setting on a print setting screen of the printer driver,a print layout of the document data; a user interface menu screen step,provided by the printer driver, on which a user performs said finishingcommand setting step to set the finishing command and said layoutsetting step to set the print layout; a counting step of counting thenumber of physical sheets to which the document data of one copy whoseoutput is desired is allocated; spooling means for spooling the documentdata as intermediate data of a data format different from that of saiddocument data; intermediate data page editing means for making a layoutprint control of the intermediate data spooled by said spooling meansbased on the number counted by said counting means and based on theprint layout set by said layout setting means; intermediate data outputmeans for outputting the intermediate data whose layout print control ismade by said intermediate data page editing means; discriminating meansfor discriminating, based on the counting by said counting means,whether the document data of one copy is printed onto one physical sheetor onto two or more physical sheets, when the enable mode is set by saidfinishing command setting means; command changing means for changing thefinishing command in response to a discrimination made by saiddiscriminating means; and print data generating means for adding thefinishing command changed by said command changing means to theintermediate data output by said intermediate data output means so as togenerate print data.
 10. A method according to claim 9, furthercomprising: a print instructing step of instructing data as intermediatedata of a data format different from that of said document data, andwherein the counting is executed in said counting step on the basis ofsaid intermediate data spooled by said spooling step.
 11. Acomputer-readable recording medium which records a print controlprogram, wherein said program comprises: a finishing command settingstep of setting, on a print setting screen of the printer driver, thefinishing command selected from among an enable mode and a disable modeto a printer so as to rotation-sort-output or offset-output documentdata; layout setting step for setting, on a print setting screen of theprinter driver, a print layout of the document data; a user interfacemenu screen step, provided by the printer driver, on which a useractivates said finishing command setting step to set the finishingcommand and said layout setting step to set the print layout; a countingstep of counting the number of physical sheets to which document data ofone copy whose output is desired is allocated; spooling means forspooling the document data as intermediate data of a data formatdifferent from that of said document data; intermediate data pageediting means for making a layout print control of the intermediate dataspooled by said spooling means based on the number counted by saidcounting means and based on the print layout set by said layout settingmeans; intermediate data output means for outputting the intermediatedata whose layout print control is made by said intermediate data pageediting means; discriminating means for discriminating, based on thecounting by said counting means, whether the document data of one copyis printed onto one physical sheet or onto two or more physical sheets,when the enable mode is set by said finishing command setting means;command changing means for changing the finishing command in response toa discrimination made by said discriminating means; and print datagenerating means for adding the finishing command changed by saidcommand changing means to the intermediate data output by saidintermediate data output means so as to generate print data.
 12. Anapparatus according to claim 1, wherein said finishing command settingmeans sets the automatic mode in which the finishing command is left toprocessing by said discriminating means and said command changing means.13. An apparatus according to claim 1, wherein said layout setting meanssets the number of logical pages to be allocated to one physical sheetand a layout order of the logical pages on the physical sheet.